import React from 'react'

type Props = {}

// 实现去重
const arr=[1,1,1,2,2,2,3];
const arr1=new Set(arr)
console.log(arr1)

// 数组去重后求和
const qc=(a:number[])=>{
  const un=Array.from(new Set(a))
  const sum=un.reduce((w,x)=>w+x,0)
  return sum
}

const num=[1,1,1,2,2,2,3];
const qxsum=qc(num)
console.log(qxsum)

const App = (props: Props) => {
  return (
    <div>App</div>
  )
}

export default App